package com.yunxin.core.application.assembler;


import com.yunxin.core.application.command.popup.PopupPageCommand;
import com.yunxin.core.application.dto.popup.PopupListDTO;
import com.yunxin.core.application.dto.popup.PopupPageDTO;
import com.yunxin.core.infra.persistence.entity.popup.PopupDO;
import com.yunxin.core.infra.persistence.entity.popup.query.condition.PopupPageCondition;
import org.mapstruct.Mapper;

/**
 * @author zero°
 * @since 2023-12-11
 */
@Mapper(componentModel = "spring")
public interface PopupAssembler {

    /**
     * command 转 condition
     * @param command command
     * @return PopupPageCondition
     */
    PopupPageCondition fromPopupPageCommand(PopupPageCommand command);

    /**
     * entity 转 dto
     * @param entity entity
     * @return PopupPageDTO
     */
    PopupPageDTO toPopupPageDTO(PopupDO entity);

    /**
     * entity 转 dto
     * @param entity entity
     * @return PopupListDTO
     */
    PopupListDTO toPopupListDTO(PopupDO entity);

}
